package com.yycwxt.modules.admin.subject;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yycwxt.domain.Subject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SubjectMapper extends BaseMapper<Subject> {

    @Select("select * from core_subject where id like concat('%',#{input},'%') or code like concat('%',#{input},'%')  or name like concat('%',#{input},'%') or direction like concat('%',#{input},'%') or fullname like concat('%',#{input},'%');")
    List<Subject> selectByInput(@Param("input") String input);


    @Select("select * from core_subject;")
    List<Subject> selectAll();
}
